<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="leagal_aid.bean.*,java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("utf-8");

String category = request.getParameter("category");
String title = request.getParameter("title");
int homepage = Integer.parseInt(request.getParameter("homepage"));
String txtDate = request.getParameter("txtDate");
String link = request.getParameter("link");
String content = request.getParameter("content");
String categoryname = request.getParameter("categoryname");

int id = Integer.parseInt(request.getParameter("id"));
System.out.println(txtDate);
System.out.print("doupdate.jsp : id:"+id+"+category :"+category +"title:"+title+"homepage"+homepage+
		"+txtDate:"+txtDate+"link:"+link+"content:"+content);
LawBean lawBean = new LawBean();
    if(lawBean.doUpdata(category,title,homepage,txtDate,link,content,categoryname,id)){
    	
	}else{
		response.setCharacterEncoding("utf-8");
		PrintWriter pout = response.getWriter();
		pout.print("<script>alert('不成功'); window.location='../updaelaw.jsp' </script>");
		pout.flush();
		pout.close();
		//response.sendRedirect("login.html");
	};

%>